package day13_Io.demo02_FileOutPutStream;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

public class Demo09copy {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream
                ("E:\\csw\\Demo\\csw1\\csw1.txt");
        int i;
        int sum=0;
        while ((i=fis.read())!=-1){
            System.out.print((char) i);
            char i1=(char) i;
            if (i1=='\n'){
                sum++;
            }
        }
        fis.close();
        System.out.println(sum);
    }
}
